﻿using AnesSystem.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls
{
    /// <summary>
    /// RetypesettingCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class RetypesettingCtrl : UserControl
    {
        RetypesettingCtrlViewModel rcvm;
        List<int> _taiShu = new List<int>()
        {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20};
        List<string> _mafs = new List<string>() { "静脉麻醉", "全身麻醉", "椎管内麻醉", "局部麻醉", "神经组织麻醉", "其他麻醉" };
        public RetypesettingCtrl()
        {
            InitializeComponent();
            rcvm = new RetypesettingCtrlViewModel();
            this.DataContext = rcvm;
            _taishu.ItemsSource = _taiShu;
            _mzfs.ItemsSource = _mafs;
            _mzfs.Text = rcvm.Plm.Schedule.Mzfs;
            //this..Text= rcvm.Plm.Patient.Brxm;
            _taishu.Text = rcvm.Plm.Schedule.PbtsInt + "";
            _roomsCmbCtrl.Text = rcvm.Plm.Schedule.Pbssjh;
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            rcvm.Save();
            DrugAndEventWindow.Instance.CloseWin();
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            DrugAndEventWindow.Instance.CloseWin();
        }
    }
}
